package com.ocom.human.service;

import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.ocom.common.entity.human.EntityPersonnelInfo;
import com.ocom.common.request.human.*;
import com.ocom.common.request.wx.UserInfoPageUpdateUserRequest;
import com.ocom.common.request.wx.UserPageAddUserRequest;
import com.ocom.common.vo.PersonVo;
import com.ocom.common.vo.human.*;
import icu.mhb.mybatisplus.plugln.base.service.JoinIService;

import java.util.List;


public interface PersonnelInfoService extends JoinIService<EntityPersonnelInfo> {

    /**获取人员列表*/
    public List<UserInfoYkmVo>  PersonnelGetPersonInfo(UserInfoVo userInfoVo, Long comId);

    public EntityPersonnelInfo  getPersonInfo(Long companyId ,UserInfoVo userInfoVo);

    public EntityPersonnelInfo  getPersonInfoByStatus(Long companyId ,UserInfoVo userInfoVo);

    public List<EntityPersonnelInfo>  getPersonInfoGtPId(Long companyId ,UserInfoVo userInfoVo);

    /**
     * 新增人员信息
     * */
    public EntityPersonnelInfo AddPerson(PersonVo personVo,Long comId);

    /**修改人员信息
     * @return*/
    public EntityPersonnelInfo UpdatePerson(PersonVo personVo, Long comId);
    /*
     * 获取人员列表
     * @param companyId
     * @param deptId
     * @return
     **/
    public List<EntityPersonnelInfo>  GetPersonInfo(Long companyId,Long deptId);

    public EntityPersonnelInfo  GetPersonInfo(Long comId, PersonnelGetPersoDecryVo personnelGetPersoDecryVo);

    public UserInfoYkmVo getPersonInfoById(Long comId, Long pId);
    public EntityPersonnelInfo GetPersonnelNoDesensitized(Long comId, Long pId);

    public EntityPersonnelInfo getPersonInfoOne(Long comId, Long pId);

    public EntityPersonnelInfo getPersonInfopIdentity(Long comId,String identity);

    public EntityPersonnelInfo getPersonInfopPhone(Long comId,String phone);

    public EntityPersonnelInfo regexpPerson(Long companyId,String name,String phone,String pIdentity);

    public EntityPersonnelInfo updateUser(Long companyId,UserInfoPageUpdateUserRequest request);

    public void updateUser(Long comId,EntityPersonnelInfo entityPersonnelInfo);

    public EntityPersonnelInfo updateUserStatus(Long companyId,Long pId,Integer state);

    public EntityPersonnelInfo addPerUser(Long companyId, UserPageAddUserRequest request);
    /**检验人员是否存在
     * @return*/
    public EntityPersonnelInfo pCodeUnique(Long comId, String pCode);

    //判断手机号身份证是否存在
    boolean existPerson(Long companyId,String phone,String idCard);

    boolean removePerson(Long companyId,Long pId,Long userId);

    /**
     * 导入人员信息（importUserInfo）
     *
     * @return*/
    public EntityPersonnelInfo ImportUserInfo(Long comId, EntityPersonnelInfo personnelInfo);

    /**
     * 获取人员加密信息（加密》解密）	personnel/getPersoDecry
     *
     * @return*/
//    public EntityPersonnelInfo PersonnelGetPersoDecry(Long comId, PersonnelGetPersoDecryVo personnelGetPersoDecryVo);



    /**
     * 查找对应的学生信息
     *
     * @return*/
    public List<EntityPersonnelInfo> getPersonInfopCode(Long comId, List<String> pCode);


    boolean updateStudentInfo(Long comId, JSONObject jsonObject);

    /**
     * 更改人员人脸图片（/updateUserFace）
     * */
    public void updateUserFace(Long comId, UpdateUserFaceVo updateUserFaceVo);

    public EntityPersonnelInfo getUserFace(Long comId, UpdateUserFaceVo updateUserFaceVo);

    // 人员列表查询（getPersonnelList）
    public List<UserListRVo> GetPersonnelList(Long comId, UserListVo userListVo);

    public XfUserInfoVo getXfUserInfo(Long comId,Long pId);


    Boolean modifyPwd(Long companyId  , PersonVo personVo);

    Boolean modifyPhoto(Long companyId  , PersonVo personVo);


    Integer checkUnique(Long companyId,String code,String phone);


    public UserInfoByNamePhoneVo  getPinfoByNameAndCode(Long comId ,String pName, String pCode);

    public List<PersonQueryVo> getPersonInfoByCardNoAndP(Long comId, Integer pId, String pCode, String pName, String cardNo);

    public List<PersonBornVo> getPersonAccountByBorn(Long companyId,Integer accType , String pBorn);

    List<EntityPersonnelInfo> getPersonByPCodes(Long companyId,List<String> pCodes);

    List<EntityPersonnelInfo> getPersonByIds(Long companyId,List<Long> pIds);

    boolean updateUserRegion(Long companyId, UpdateUserRegionRequest request);

    List<KqStudentVo>  getKqAndStudentsOnline(Long companyId, StudentsOnlineRequest request);

    PageInfo<EntityPersonnelInfo> getKqAndStudentsDetail(Long companyId, StudentsDetailRequest request);

    PageInfo<EntityPersonnelInfo> getKqAndStudentsDetail2(Long companyId, StudentsDetailRequest request);
    boolean updateById(Long companyId, EntityPersonnelInfo personnelInfo);

    List<EntityPersonnelInfo> getUserListBypIds(Long companyId, List<Long> pIds);

    public List<EntityPersonnelInfo>  getEmptyFeaturePhoto(Long companyId);

}
